package com.example.websocket.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
/**
 * @ author 韩
 * time: 2024/3/15 20:07
 */

@Configuration
public class Knife4jConfig {
    // 设置 openapi 基础参数
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("SpringBoot API 管理")
                        .contact(new Contact().name("韩非").email("3168134942@qq.com").url("https://blog.csdn.net/N_007"))
                        .version("1.0")
                        .description( "基于websocket的聊天应用")
                        .license(new License().name("Apache 2.0")));
    }
}


